package Lab02.test04;
public class Employee {
    Employee() {
        System.out.println("这是构造函数！");

    }


    //属性:员工姓名、员工号码、员工基本薪水、员工薪水增长额

    private String name;

    private String number;

    private double salary;

    private double increase;

    //行为：构造方法、获取员工姓名、获取员工号码、获取员工基本薪水、计算薪水增长额及计算增长后的工资总额

    //用构造方法接收输入的所有参数

    public Employee(String name, String number, double salary, double increase) {

        this.name = name;

        this.number = number;

        this.salary = salary;

        this.increase = increase;

    }

    public String getName() {

        return name;

    }

    public void setName(String name) {

        this.name = name;

    }

    public String getNumber() {

        return number;

    }

    public void setNumber(String number) {

        this.number = number;

    }

    public double getSalary() {

        return salary;

    }

    public void setSalary(double salary) {

        this.salary = salary;

    }

    public double getIncrease() {

        return increase;

    }

    public void setIncrease(double increase) {

        this.increase = increase;

    }

    public double income() {
        return salary + increase;

    }

    private void print() {

        System.out.print(" 员工姓名:" + this.name + "\n" + "员工号码： " + this.number + "\n" + "基本工资： " + this.salary + "\n" + " 总工资： ");

    }
}
